package com.uplooking.util;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

import com.uplooking.pojo.UserVO;

public class ShiroUtils {
	
	public static UserVO getUser() {
		Subject subject = SecurityUtils.getSubject();
		if (subject.getPrincipal() instanceof UserVO) {
			return (UserVO) subject.getPrincipal();
		}
		return null;
	}
}
